﻿@Model
@{
    ViewBag.user = ViewContext.Controller.ControllerContext.HttpContext.Session["user"];
    if (ViewBag.user != null)
    {
        ViewBag.UserName = ViewBag.user.ToString();
    }
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/bootstrap-huan.css")
    @Styles.Render("~/Content/style.css")
    
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/Scripts/bootstrap.js")
</head>
<body>
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="navbar-header" data-toggle="collapse" data-target="#naviagtionMenu">
            <a class="navbar-brand">WCLOnlineExam</a>
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <div class="collapse navbar-collapse" id="naviagtionMenu">
            <ul class="nav navbar-nav ">
                <li class="active">
                    @Html.ActionLink("主页", "Index", "Home")
                </li>
                <li>
                    @Html.ActionLink("在线考试", "Index", "Home")
                </li>
                <li>
                    @Html.ActionLink("会员中心", "UserCenter", "Student")
                </li>
                <li>
                    @Html.ActionLink("个人设置", "Setting", "Student")
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                @if (ViewBag.user != null)
                {
                    <li>
                        <a href="#" id="system-info-account" target="_blank">@ViewBag.UserName</a>
                    </li>

                    <li>
                        @Html.ActionLink("退出", "Logout", "Account")
                    </li>
                    
                }
                else
                {
                     <li>
                        @Html.ActionLink("登陆", "Login", "Account")
                    </li>
                }
            </ul>
        </div>
    </nav>
    <div class="container" style="padding-top:72px">
        @RenderBody()
    </div>
    @Html.Partial("_FooterPartial")<!--_FooterPartial视图占位符-->
    @RenderSection("scripts", required: false)
</body>
</html>
